<template>
  <section class="hero">
    <div class="container">
      <div class="hero-content">
        <h1 class="hero-title">{{ title }}</h1>
        <p class="hero-subtitle">{{ subtitle }}</p>
        <div class="hero-actions">
          <button class="btn btn-primary" @click="primaryButtonAction">{{ primaryButton.text }}</button>
          <button class="btn btn-secondary" @click="secondaryButtonAction">{{ secondaryButton.text }}</button>
        </div>
      </div>
      <div class="hero-image">
        <div style="width: 300px; height: 200px; background-color: #ddd; border-radius: 8px;"></div>
      </div>
    </div>
  </section>
</template>

<script>
export default {
  name: 'HeroSection',
  props: {
    title: {
      type: String,
      default: '创新项目名称'
    },
    subtitle: {
      type: String,
      default: '一句简短的项目描述，突出项目的核心价值'
    },
    primaryButton: {
      type: Object,
      default: () => ({
        text: '开始使用',
        action: null
      })
    },
    secondaryButton: {
      type: Object,
      default: () => ({
        text: '了解更多',
        action: null
      })
    }
  },
  methods: {
    primaryButtonAction() {
      if (this.primaryButton.action) {
        this.primaryButton.action();
      }
    },
    secondaryButtonAction() {
      if (this.secondaryButton.action) {
        this.secondaryButton.action();
      }
    }
  }
}
</script>

<style scoped>
.hero {
  padding: 150px 0 80px;
  background-color: #f9f9f9;
}

.hero-content {
  max-width: 600px;
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #333;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: #666;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  gap: 15px;
}

.btn {
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.btn-primary {
  background-color: #4CAF50;
  color: white;
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid #4CAF50;
  color: #4CAF50;
}

.btn-primary:hover {
  background-color: #45a049;
}

.btn-secondary:hover {
  background-color: rgba(76, 175, 80, 0.1);
}

@media (max-width: 768px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-content {
    margin-bottom: 30px;
  }
  
  .hero-actions {
    justify-content: center;
  }
}
</style>
